<?php
/* @var $this GadgetController */
/* @var $model Gadget */

$this->breadcrumbs=array(
	'Gadgets'=>array('index'),
	$model->name,
);

$this->menu=array(
	array('label'=>'List Gadget', 'url'=>array('index')),
	array('label'=>'Create Gadget', 'url'=>array('create')),
	array('label'=>'Update Gadget', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Gadget', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Gadget', 'url'=>array('admin')),
);
?>

<h1>View Gadget #<?php echo $model->id; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'name',
		array(
            'name'=>'categoryId',
            'type'=>'raw',
            'value'=>$model->getCategory(),
        ),
		'description',
		'imageUrl',
		array(
            'name'=>'image',
            'type'=>'raw',
            'value'=>'<img src='.Yii::app()->baseUrl.'/uploads/products/'.$model->imageUrl.' height="300px" />',
        ),
		'urlKey',
		//'isActive',
		array(
            'name'=>'isActive',
            'type'=>'raw',
            'value'=>$model->getStatus(),
        ),
	),
)); ?>

<h1>Gadget Quote price</h1>
<?php
		foreach($Gadgetcondition as $key=>$value){
			$price = $value->getQuote($value->id,$model->id);
			
?>
	<div class="span12">
		<p><span style="width: 200px; display:block; float: left"><?php echo $value->name;?>: </span><span><?php echo $price;?> $</span></p>
	</div>
<?php
		}
?>
